<template>
	<view class="flex-colume-start content indexPage">
		<image mode="aspectFill" style="width: 750rpx; height: 332.5rpx;" src="/static/index/main_bg11.png"></image>
		<view class="flex-colume-start" style="width: 690rpx; align-items: flex-start;">
			<view @click="itemClick(99)" class="flex-row-center scanBtn" style="font-size: 0px;">
				<image style="width: 70rpx; height: 70rpx;" src="/static/index/main_icon28.png"></image>
				<view style="margin-left: 16rpx; font-size: 28rpx; color: #3277ff;">扫描电表</view>
			</view>
			<image style="margin-top: 50rpx; margin-bottom: 10rpx; width: 200rpx;" mode="widthFix" src="/static/index/main_text2.png"></image>
			<view @click="itemClick(index)" v-for="(item,index) in titleArr" :key="index" class="flex-row-start item1">
				<image src="/static/index/main_icon06.png"></image>
				<view style="font-size: 30rpx;">{{item}}</view>
			</view>
		</view>
		
	</view>
</template>

<script>

	
	export default {
		data() {
			return {
				titleArr:['换电表任务','登出']
				
			}
		},
		methods: {
			itemClick(index){
				if (index == 99){
					uni.scanCode({
						autoZoom: false,
						success: (res) => {
							var result = res.result
							uni.navigateTo({
								url:'/pages/meterInfo/meterInfo?code='+result
							})
						}
					})
	
					return
				}
				if (index == 0){
					uni.navigateTo({
						url:'/pages/taskList/taskList'
					})
					
					
				}
				if (index == 2){
					
				}
				if (index == 1){
					uni.removeStorageSync('ele-mix-token')
					uni.reLaunch({
						url:'/pages/login/login'
					})
				}
			}
			
		}
	}
</script>


<style lang="scss" scoped>
	.scanBtn{
		border: 1px solid #d3e2ff;
		padding: 20rpx 50rpx 20rpx 30rpx;
		box-sizing: border-box;
		border-radius: 10rpx;
		margin-top: 40rpx;
		
	}
	
	.indexPage{
		.item1{
			width: 100%;
			font-size: 0rpx;
			color: #5770a0;
			padding: 25rpx 10rpx;
			border-bottom: 1px solid #ededed;
			image{
				width: 66rpx;
				height: 66rpx;
				margin-right: 20rpx;
				
			}
			
			
		}
	}
	
	

</style>
